export interface WebConfigType {
  company_address: string
  company_emali: string
  company_fax: string
  company_map: string
  company_mobile: string
  company_name: string
  company_whatsapps: string
  web_name: string
  web_site_copyright: string
  web_site_logo: string
}

/**
 * ? 首页配置 - START
 */
enum UrlSwitchEnum {
  True = '1',
  False = '0',
}
interface BannerType {
  title: string
  content: string
  pic: string
  url_switch: UrlSwitchEnum
  url_type: string
  params: {
    url: string
  }
}
interface IndexContentType {
  title: string
  content: string
  num1: string
  title1: string
  pic: string
  label: string[]
}
interface IndexContent2Type {
  title: string
  content: string
  pic: string
}
export interface HomeConfigType {
  banner: BannerType
  index_content: IndexContentType
  index_content2: IndexContent2Type
}
/**
 * ! 首页配置 - END
 */

/**
 * ? 关于我们配置 - START
 */
interface AboutLeadToEnvironmentType {
  page_title: string
  page_content: string
  imgs: string
}

interface AdvantageHighlightTechnologyType {
  id: number
  title: string
  content: string
  pic: string
}

export interface AboutConfigType {
  about: AboutLeadToEnvironmentType
  lead_to: AboutLeadToEnvironmentType
  environment: AboutLeadToEnvironmentType
  advantage_type: AdvantageHighlightTechnologyType[]
  highlight_type: AdvantageHighlightTechnologyType[]
  technology_type: AdvantageHighlightTechnologyType[]
}

/**
 * ! 关于我们配置 - END
 */

/**
 * ? 课程配置 - START
 */
interface ListItemType {
  content: string
  annotation: string
}
export interface CourseItemType {
  id: number
  title: string
  content: string
  annotation: string
  cover_img: string
  ps: string
  list: ListItemType[]
}
export interface CourseType {
  id: number
  title: string
  course: CourseItemType[]
}
/**
 * ! 课程配置 - END
 */

/**
 * ? 报名课程 - START
 */
export interface SignUpCourseType {
  first_name: string
  last_name: string
  phone: string
  email: string
  birthday: string
  idcard_img1: string
  idcard_img2: string
  academic: string
  resume: string
  working: string
  course_id: number | null
}
/**
 * ! 报名课程 - END
 */

/**
 * ? 登录 - START
 */
export enum IdentityEnum {
  Student = 'student',
  Teacher = 'teacher',
}
export interface LoginType {
  account: string
  loginpass: string
  identity: IdentityEnum.Student | IdentityEnum.Teacher
  remember?: boolean
}
export interface LoginResponseType {
  token: {
    access_token: string
    refresh_expires_in: number
    expires_in: number
  }
  member: UserInfoType
}
/**
 * ! 登录 - END
 */

/**
 * ? 用户信息 - START
 */
export enum SexEnum {
  Male = '1',
  Female = '0',
}

export interface UserInfoType {
  name: string
  id: number
  mobile: string
  identity: IdentityEnum.Student | IdentityEnum.Teacher
  account: string
  avatar: string
  sex: SexEnum.Male | SexEnum.Female
  age: string
  email: string
  experience: number
  signature: string
}

export interface EditUserInfoType {
  name: string
  sex: SexEnum.Male | SexEnum.Female
  age: string
  email: string
  experience: number
  signature: string
}
/**
 * ! 用户信息 - END
 */

/**
 * ? 图书馆 - START
 */
export interface LibraryCateType {
  id: string
  key: string
  title: string
  label: string
  children?: LibraryCateType[]
}

export interface LibraryBookRequestType {
  cate_id: string
  keywords: string
  page: number
  page_size: number
}

export interface LibraryBookResponseType {
  data: {
    total: number
    data: LibraryBookDetailType[]
  }
}

export interface LibraryBookDetailType {
  id: string
  title: string
  ps: string
  status: number
  cover_img: string
  content: string
  file: string
  create_time: string
}
/**
 * ! 图书馆 - END
 */
